<% layout('layout/layout') %>
<% block('header').append(`<style>
    .img_file{
        width:100px;
        height:100px;
        border:1px solid #e3e3e3;
        position:relative;
    }
    .img_file:after{
        content:"+";
        position:absolute;
        width:100%;
        height:100%;
        font-size:30px;
        text-align:center;
        line-height:100px;
    }
</style>`)%>
<div class="container" >
  <h1><%= title %></h1>
 <!-- this.userName=user.userName;
  this.pwd=user.pwd;
  this.email=user.email;
  this.nickName=user.nickName;
  this.realName=user.realName;
  this.cardID=user.cardID;
  this.mobile=user.mobile;
  this.area=user.area;
  this.remark=user.remark;
  this.headImg=user.headImg;
  this.amount=user.amount;
  this.score=user.score;
  this.address=user.address;
  this.favorite=user.favorite;
  this.createTime=user.createTime;
  this.updateTime=user.updateTime;
  this.weixin=user.weixin;
  this.weibo=user.weibo;
  this.qq=user.qq;-->
  <div class="row">
    <div class="col-md-6 col-xl-6">
      <form id="form" action="/tool/createUser" method="post" novalidate>
        <div class="form-group">
          <label >登录用户名</label>
          <input name="user[userName]" type="text" class="form-control" value="czwaiwai" placeholder="用户名">
        </div>
        <div class="form-group">
          <label >E-mail</label>
          <input name="user[email]" type="text" class="form-control"   value="278178596@qq.com"  placeholder="E-mail">
        </div>
        <div class="form-group">
          <label >昵称</label>
          <input name="user[nickName]" type="text" class="form-control" value="歪歪" placeholder="昵称">
        </div>
        <div class="form-group">
          <label >真实姓名</label>
          <input name="user[realName]" type="text" class="form-control" value="曹正"  placeholder="真实姓名">
        </div>
        <div class="form-group">
          <label >身份证</label>
          <input name="user[cardID]" type="text" class="form-control" value="420203199002114319"  placeholder="身份证">
        </div>
        <div class="form-group">
          <label >手机号码</label>
          <input name="user[mobile]" type="text" class="form-control" value="13728905705"  placeholder="手机号码">
        </div>
        <div class="form-group">
          <label >地区</label>
          <input name="user[area]" type="text" class="form-control"  value="深圳" placeholder="地区">
        </div>
        <div class="form-group">
          <label >备注</label>
          <input name="user[remark]" type="text" class="form-control" value="数钱数到自然醒，睡觉睡到脚抽经"  placeholder="电子邮箱">
        </div>
        <div class="form-group">
          <label >头像</label>
          <div id="imgUpload" class="img_file"  data-input="#headImg" >
            <input name="file"  multiple  style="display:none;" type="file" >
          </div>
          <input  id="headImg" name="user[headImg]"  type="hidden" class="form-control"  placeholder="头像">
        </div>
        <div class="form-group">
          <label >地址</label>
          <input name="user[address]" type="text" class="form-control"  value="深圳市福田车公庙地铁站" placeholder="地址">
        </div>
        <input name="user[amount]" type="hidden" class="form-control"  placeholder="余额">
        <input name="user[score]" type="hidden" class="form-control"  value="0" placeholder="积分">
        <button type="submit" class="btn btn-default">创建</button>
      </form>
    </div>
    <div class="col-md-6 col-xl-6">

    </div>
  </div>
</div><!-- /.container -->
<% block('footer').append(`<script src="/js/uploadImg.js"></script>`)%>
<% block('footer').append(`<script>
    jQuery(function(){
          //var $form=$("#form");
       $('#imgUpload').uploadImg(function(imgs){
            $(this).css({"background":"url("+imgs[0].thumb.url+") no-repeat","background-size":"cover"});
       });
    })
</script>`)%>
